package com.icezzz.db_valid;

import cn.hutool.core.util.StrUtil;

public class StringUtils {
    public static String removeLineChar(String str) {
        if (StrUtil.isBlankIfStr(str)) {
            return str;
        }
        str = str.replace("\r\n", " ");
        str = str.replace("\n", " ");
        str = str.replace("\r", " ");
        return str;
    }

    public static boolean containBlankOrUndefined(String name) {
        int length = name.length();
        for (int i = 0; i < length; i++) {
            String value = String.valueOf(name.charAt(i));
            if (StrUtil.isBlankOrUndefined(value)) {
                return true;
            }
        }
        return false;
    }
}
